/*
 * @Author: “Jackson” “1145239633@qq.com”
 * @Date: 2025-07-30 09:15:53
 * @LastEditors: “Jackson” “1145239633@qq.com”
 * @LastEditTime: 2025-07-30 09:16:13
 * @FilePath: \shaangu-web\src\api\system\workflow.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request'

// 查询工作流列表
export function listWorkflow(query) {
  return request({
    url: '/product/workflow/list',
    method: 'get',
    params: query
  })
}

// 查询工作流详细
export function getWorkflow(id) {
  return request({
    url: '/product/workflow/' + id,
    method: 'get'
  })
}

// 新增工作流
export function addWorkflow(data) {
  return request({
    url: '/product/workflow',
    method: 'post',
    data: data
  })
}

// 修改工作流
export function updateWorkflow(data) {
  return request({
    url: '/product/workflow',
    method: 'put',
    data: data
  })
}

// 删除工作流
export function delWorkflow(id) {
  return request({
    url: '/product/workflow/' + id,
    method: 'delete'
  })
}

// 设置工作流步骤
export function taskWorkflowStep(data) {
  return request({
    url: '/product/taskWorkflowStep/install',
    method: 'post',
    data
  })
}
